import track from "../../effect/track";
import { TrackOpTypes } from "../../utils";

const hasHandler: ProxyHandler<object>["has"] = (target, key) => {
  // 依赖收集
  track(target, TrackOpTypes.HAS, key);

  const result = Reflect.has(target, key);
  return result;
};

export default hasHandler;
